(define (count-change x)
  (num-changes x (list 50 25 10 5 1))

(define (num-changes x l)
  (cond ((< x 0) 0)
	((= x 0) 1)
	((null? l) 0)
	(else (+ (num-changes x (cdr l))
		 (num-changes (- x (car l)) 
			      l)))))
	
